package com.semeureka.fault.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.semeureka.fault.bean.Current;
import com.semeureka.fault.dao.CurrentDao;
import com.semeureka.fault.service.CurrentService;
import com.semeureka.fault.util.Message;

@Component
@Transactional
public class CurrentServiceImpl implements CurrentService {
	@Autowired
	private CurrentDao currentDao;

	@Override
	public void update(Message message) {
		if (message instanceof Current) {
			Current current = (Current) message;
			currentDao.save(current);
		}
	}
}
